import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/dungeon_rank.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/dungeons.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/fight_succ.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/stageinfo.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/stages.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/user_card.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/vitality.dart';

class CheckpointState {
  int selectKey;
  Map<int, String> selectMap;
  CheckpointDungeons checkpointDungeons;
  String dungeonid;
  CheckpointStages checkpointStages;
  CheckpointStageInfo checkpointStageInfo;
  DungeonRank dungeonRank;
  DungeonVitality dungeonVitality;
  UserCard userCard;
  FightSucc fightSucc;

  CheckpointState(
      {this.selectKey,
      this.selectMap,
      this.checkpointDungeons,
      this.dungeonid,
      this.checkpointStages,
      this.checkpointStageInfo,
      this.dungeonRank,
      this.dungeonVitality,
      this.userCard,
      this.fightSucc});

  CheckpointState copyWith(
      {selectKey,
      selectMap,
      checkpointDungeons,
      dungeonid,
      checkpointStages,
      checkpointStageInfo,
      dungeonRank,
      dungeonVitality,
      userCard,
      fightSucc}) {
    return CheckpointState(
      selectKey: selectKey ?? this.selectKey,
      selectMap: selectMap ?? this.selectMap,
      checkpointDungeons: checkpointDungeons ?? this.checkpointDungeons,
      dungeonid: dungeonid ?? this.dungeonid,
      checkpointStages: checkpointStages ?? this.checkpointStages,
      checkpointStageInfo: checkpointStageInfo ?? this.checkpointStageInfo,
      dungeonRank: dungeonRank ?? this.dungeonRank,
      dungeonVitality: dungeonVitality ?? this.dungeonVitality,
      userCard: userCard ?? this.userCard,
      fightSucc: fightSucc ?? this.fightSucc,
    );
  }

  static CheckpointState initialState() {
    return CheckpointState(
      selectKey: 0,
      selectMap: {},
      checkpointDungeons: CheckpointDungeons(dungeonList: [], groups: []),
      dungeonid: '',
      checkpointStages: null,
      checkpointStageInfo: null,
      dungeonRank: null,
      dungeonVitality: null,
      userCard: null,
      fightSucc: null,
    );
  }
}
